/** 
 * DeleteFileProcessor.java
 * @author Lex
 * 2007-8-16 ����07:43:40
 */
package org.lex.io.filesystem.tools;

import java.io.File;

import org.lex.io.filesystem.traveller.FileProcessor;


public class DeleteFileOperator implements FileProcessor<Boolean> {
	public Boolean operate(File file) {
		if (null == file || false == file.exists())
			return true;
		try {
			System.out.print(file.getName());
			file.delete();
			System.out.println("\tDeleted");
			return true;
		} catch (Exception e) {
			System.out.println("\tError");
			return false;
		}
	}
}
